import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/screenCode',
  component: Layout,
  redirect: '/screenCode/index',
  name: 'screenCode',
  meta: {
    title: '广告机兑换码',
    icon: 'material-symbols:device-unknown-outline',
  },
  children: [
    {
      path: 'codeList',
      name: 'codeList',
      component: () => import('@/views/screencode/codeList.vue'),
      meta: {
        title: '兑换码列表',
      },
    },
    {
      path: 'logList',
      name: 'logList',
      component: () => import('@/views/screencode/logList.vue'),
      meta: {
        title: '分配日志',
      },
    },
    {
      path: 'actList',
      name: 'ScreenCodeActList',
      component: () => import('@/views/screencode/actList.vue'),
      meta: {
        title: '活动列表',
      },
    },
    {
      path: 'ScreenCodeActDetail',
      name: 'ScreenCodeActDetail',
      component: () => import('@/views/screencode/detail.vue'),
      meta: {
        title: '活动配置',
        menu: false,
        activeMenu: '/screenCode/actList',
      },
    },
  ],
}

export default routes
